class RDQuestInventory extends RDQuestFramework
	config(PlayerInventory)
	perobjectconfig
	perobjectlocalized
	dependson(RDQuest)
	notplaceable;

//`Define QuestTest	"True"
`if( `isdefined(QuestTest))
var RDQuest TestQuest;
`endif
////////////////////////////////////////////////////////////////////

var RDQuest QuestTemplate;
var private array<RDQuest> Qlist;
var bool bHasQuests;

//////////////////////////////////////////////////////////////////
/////////////////Overides//////////////////////////////////////
///////////////////////////////////////////////////////////////////
function RecieveCompletion(bool isSuccess)
{

}

//////////////////////////////////////////////////////////////
////////////////States/////////////////////////////////////
//////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
/////////////////Other Functionality//////////////////
//////////////////////////////////////////////////////////////

//Guize, basically this just checks the quest inventory to see if it has any quests
function bool HasAnyQuests(RDQuestInventory InventoryToCheck)
{
	if( (InventoryToCheck != none) )
	{
		if( (InventoryToCheck.bHasQuests == true) )
			return true;
	}

	return false;
}

//Check for a specific quest...
function bool HasQuest(RDQuest Quest)
{
	if( Quest != none)
	{
		//if( QList.Find( 'sName', Quest.sName ) != -1 )
		//	return true;
	}
	return false;
}

//Return false for invalid index. (Debugging)
function bool RemoveQuestByIndex(int Index)
{
	if( Index > -1 && Index < Qlist.Length )
	{
		QList.Remove(Index, 1);
		return true;
		if( Qlist.Length == 0 )
			bHasQuests = false;
	}
	return false;
}

//Return true for success.
function bool RemoveQuestByName(name qName)
{
	local int temp;
	temp = 1;
	//temp = Qlist.Find( 'sName', qName);

	if( temp != -1 && temp < Qlist.Length )
	{
		//Qlist.RemoveIndex(temp);
		return true;
	}
	return false;
}

defaultproperties
{

	bHasQuests= false

	/*
	Begin Object Class=RDQuest Name=rQuest

	End Object
	QuestTemplate=rQuest
	*/

	//Are we currently testing? Only use this for debugging the inventory.
	`If( `isdefined(QuestTest))
	//QList.AddItem(TestQuest);
	`endif
}
